<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

//移动端API
Route::group(['namespace' => 'Api', 'middleware' => 'cors'], function () {

    //获取临时二维码
    Route::any('weChat/index', 'WechatController@index');
    Route::any('getWechatQrcode', 'WechatController@getWechatQrcode');
    Route::any('getLoginUser', 'WechatController@getLoginUser');

    //小程序授权使用
    Route::any('getUserStatus', 'LoginController@getUserStatus');
    Route::any('setUsersMobile', 'LoginController@setUsersMobile');

    //登录注册
    Route::post('login', 'LoginController@login');
    Route::post('register', 'LoginController@register');
    Route::post('forget', 'LoginController@forget');

    //获取首页数据
    Route::post('getConfig', 'ToolsController@getConfig');
    Route::post('getIndex', 'ToolsController@getIndex');
    Route::post('getArea', 'ToolsController@getArea');
    Route::post('getDict', 'ToolsController@getDict');
    Route::post('getLocation', 'ToolsController@getLocation');
    Route::post('getAgreement', 'ToolsController@getAgreement');
    Route::post('upload', 'ToolsController@upload');
    Route::post('getService', 'OtherController@getService');

    Route::post('house/index', 'HouseController@index');
    Route::post('house/detail', 'HouseController@detail');
    //新闻资讯
    Route::post('news/index', 'NewsController@index');
    Route::post('news/cate', 'NewsController@cate');
    Route::post('news/details', 'NewsController@details');
    Route::post('news/goCommon', 'NewsController@goCommon');

});

